### repeat previous studies
logit mort_28_day i.category_num i.gender_num age weight_first sapsi_first elix_mimic_28_day i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if chf_flg==0 & service_unit_num<2 & vent_48hr_flg==1, or
lroc, nograph
estat gof, group(5) table

logit mort_1_year i.category_num i.gender_num age weight_first sapsi_first elix_mimic_1_year i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if chf_flg==0 & service_unit_num<2 & vent_48hr_flg==1, or
lroc, nograph

logit mort_2_year i.category_num i.gender_num age weight_first sapsi_first elix_mimic_2_year i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if chf_flg==0 & service_unit_num<2 & vent_48hr_flg==1, or
lroc, nograph

#severity break-down
logit mort_28_day i.ards_severity_num i.gender_num age weight_first sapsi_first elix_mimic_28_day i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if chf_flg==0 & service_unit_num<2 & vent_48hr_flg==1, or
lroc, nograph
estat gof, group(10) table

logit mort_1_year i.ards_severity_num i.gender_num age weight_first sapsi_first elix_mimic_1_year i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if service_unit_num<2, or
lroc, nograph

logit mort_2_year i.ards_severity_num i.gender_num age weight_first sapsi_first elix_mimic_2_year i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if service_unit_num<2, or
lroc, nograph


# Whole cohort after loosening criteria
logit mort_28_day i.category_num i.gender_num age weight_first sapsi_first elix_mimic_28_day i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if chf_flg==0 & service_unit_num<2, or
lroc, nograph

logit mort_1_year i.category_num i.gender_num age weight_first sapsi_first elix_mimic_1_year i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if chf_flg==0 & service_unit_num<2, or
lroc, nograph

logit mort_2_year i.category_num i.gender_num age weight_first sapsi_first elix_mimic_2_year i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if chf_flg==0 & service_unit_num<2, or
lroc, nograph

#severity break-down
logit mort_28_day i.ards_severity_num i.gender_num age weight_first sapsi_first elix_mimic_28_day i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if chf_flg==0 & service_unit_num<2, or
lroc, nograph
estat gof, group(5) table

logit mort_1_year i.ards_severity_num i.gender_num age weight_first sapsi_first elix_mimic_1_year i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if chf_flg==0 & service_unit_num<2, or
lroc, nograph

logit mort_2_year i.ards_severity_num i.gender_num age weight_first sapsi_first elix_mimic_2_year i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if chf_flg==0 & service_unit_num<2, or
lroc, nograph

##########include chf patients

logit mort_28_day i.category_num i.gender_num age weight_first sapsi_first elix_mimic_28_day i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if service_unit_num<2, or
lroc, nograph

logit mort_1_year i.category_num i.gender_num age weight_first sapsi_first elix_mimic_1_year i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if service_unit_num<2, or
lroc, nograph

logit mort_2_year i.category_num i.gender_num age weight_first sapsi_first elix_mimic_2_year i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if service_unit_num<2, or
lroc, nograph

#severity break-down
logit mort_28_day i.ards_severity_num i.gender_num age weight_first sapsi_first elix_mimic_28_day i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if service_unit_num<2, or
lroc, nograph

logit mort_1_year i.ards_severity_num i.gender_num age weight_first sapsi_first elix_mimic_1_year i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if service_unit_num<2, or
lroc, nograph

logit mort_2_year i.ards_severity_num i.gender_num age weight_first sapsi_first elix_mimic_2_year i.service_unit_num i.sepsis_flg  i.malignancy_flg i.neurological_flg i.headinjury_flg if service_unit_num<2, or
lroc, nograph
